package com.xiantm.study.thread.workthread;


public class WorkThread extends Thread {
    private final Channel channel;

    public WorkThread(String name,Channel channel) {
        super(name);
        this.channel = channel;
    }

    @Override
    public void run() {
//        String threadName = Thread.currentThread().getName();
//        System.out.println(threadName + ": Started");
        while (true){
            Request request = channel.takeRequest();
            request.execute();
        }
    }
}
